<template>
  <svg :style="{ width: `${width}px`, height: `${height}px` }">
    <use :xlink:href="url" :fill="color" v-if="url"></use>
    <use :xlink:href="`${prefix}${icon}`" :fill="color" v-else></use>
  </svg>
</template>
<script setup lang="ts">
defineProps({
  url: {
    type: String,
    default: '',
  },
  prefix: {
    type: String,
    default: '#icon-',
  },
  icon: String,
  color: {
    type: String,
    default: '',
  },
  width: {
    type: String,
    default: '16',
  },
  height: {
    type: String,
    default: '16',
  },
})
</script>
<style scoped></style>
